package sctu.edu.java.year2016.team07.huangsuixin;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * Created by Huang Suixin on 2016/6/13.
 */
//创建一个数据库连接，并返回连接对象conn
public class ConnectionSql {
    public static Connection ConnectionSql() throws SQLException {

        String url = "jdbc:mysql://localhost:3306/java?serverTimezone=UTC&useSSL=false";
        String user = "root";
        String password = "";
        Connection conn = DriverManager.getConnection(url,user,password);
        return conn;

    }
}
